-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FreeRedis Diagnostics #547
Conversation
/// </summary> | ||
public class FreeRedisTracingDiagnosticProcessor : ITracingDiagnosticProcessor | ||
{ | ||
public static readonly StringOrIntValue Free_Redis = new StringOrIntValue(7, "Redis"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redis is a server-side ID, you should update the main repository to register a new ID with mapping
public void Notice([Object] NoticeEventArgs eventData) | ||
{ | ||
var context = CreateFreeRedisLocalSegmentContext(eventData.NoticeType.ToString()); | ||
context.Span.AddTag("cache.statement", eventData.Log); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the virtual cache doc to update tags accordingly.
https://skywalking.apache.org/docs/main/next/en/setup/service-agent/virtual-cache/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
private SegmentContext CreateFreeRedisLocalSegmentContext(string operation) | ||
{ | ||
var context = _tracingContext.CreateLocalSegmentContext(operation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redis calls should use exit segment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redis calls should use exit segment
I don't understand what you mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CreateExitSegmentContext.
} | ||
#endregion | ||
/// <summary> | ||
/// 解析读写 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove CN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tags are good to me. @liuhaoyang We may consider a new release.
@@ -0,0 +1,108 @@ | |||
using System; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All code files need to add the SkyAPM copyright header. Please refer to https://github.com/SkyAPM/SkyAPM-dotnet/blob/main/src/SkyApm.Abstractions/ITracingDiagnosticProcessor.cs#L1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All code files need to add the SkyAPM copyright header. Please refer to https://github.com/SkyAPM/SkyAPM-dotnet/blob/main/src/SkyApm.Abstractions/ITracingDiagnosticProcessor.cs#L1
ok
+1 |
@@ -42,6 +42,8 @@ public static class Components | |||
|
|||
public static readonly StringOrIntValue Free_SQL = new StringOrIntValue(3017, "FreeSql"); | |||
|
|||
public static readonly StringOrIntValue Free_Redis = new StringOrIntValue(3018, "FreeRedis"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guochen2 Please register 3018 ID in the main repository.
LGTM |
Recently I will prepare for the testing and release v2.2.0 |
@liuhaoyang Look like we miss updating https://github.com/SkyAPM/SkyAPM-dotnet/blob/main/docs/Supported-list.md for a while. |
Please answer these questions before submitting pull request
Why submit this pull request?
Bug fix
New feature provided
Improve performance
Related issues
New feature or improvement